package com.csw.xuxianParent.xuxianBase.controller;

import com.csw.xuxianParent.xuxianCommon2.entity.Result;
import com.csw.xuxianParent.xuxianCommon2.entity.StatusCode;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class BaseExceptionHander {

	@ExceptionHandler(value = Exception.class)
	public Result error(Exception e) {
        return new Result(false, StatusCode.ERROR, "出错了", e);
	}

}
